package com.migraine.model;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

public class Message {
    private Integer messageid;

    private String sender;

    private String receiver;

    private String messageinfo;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createtime;

    public Integer getMessageid() {
        return messageid;
    }

    public void setMessageid(Integer messageid) {
        this.messageid = messageid;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender == null ? null : sender.trim();
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver == null ? null : receiver.trim();
    }

    public String getMessageinfo() {
        return messageinfo;
    }

    public void setMessageinfo(String messageinfo) {
        this.messageinfo = messageinfo == null ? null : messageinfo.trim();
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Override
    public String toString() {
        return "Message{" +
                "messageid=" + messageid +
                ", sender='" + sender + '\'' +
                ", receiver='" + receiver + '\'' +
                ", messageinfo='" + messageinfo + '\'' +
                ", createtime=" + createtime +
                '}';
    }
}